<script lang="ts" setup>
import {ref} from "vue";
import type {IndexForum} from "../../network/types/Resources.ts";
import CommonRoute from "../routes/CommonRoute.vue";
import {iconUrl} from "../../utils/Utils.ts";

interface Props {
  data: IndexForum
}


const props = defineProps<Props>();

const data = ref(true)
</script>

<template>
  <div style="display: inline-block;margin: 10px 10px"><span style="display: flex;">
    <common-route :fid="props.data.forumId" :stid="props.data.colTid">
      <el-image :src="iconUrl(props.data.colTid ||props.data.forumId)" style="width: 100px"/>
    </common-route>
    <common-route :fid="props.data.forumId" :stid="props.data.colTid" style="padding-left: 10px">
      <div style="display: inline-block;text-align: start">
        <b>{{ props.data.name || props.data.simpleName }}</b>
        <br>
        <span style=" opacity: 0.7">{{ props.data.info || props.data.simpleInfo }}</span>
      </div>
    </common-route>
  </span></div>
</template>

<style scoped>
</style>